package org.example.controller;

import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
import io.swagger.v3.oas.annotations.Operation;
import io.swagger.v3.oas.annotations.tags.Tag;
import org.example.pojo.DPower;
import org.example.pojo.select.DApplyApartmentSelect;
import org.example.service.DPowerService;
import org.example.utils.Result;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.*;

import java.util.List;
import java.util.Map;

@CrossOrigin(origins = "*")
@RestController
@RequestMapping("power")
@Tag(name = "权限数据API",description = "Power Controller")
public class DPowerController {

    @Autowired
    private DPowerService dPowerService;

    @Operation(summary = "获取全部权限")
    @PostMapping("/selectAll")
    public Result<List<DPower>> selectAll(){
        LambdaQueryWrapper<DPower> lambdaQueryWrapper = new LambdaQueryWrapper<>();
        return Result.ok(dPowerService.list(lambdaQueryWrapper));
    }
}
